Fix guest boot if set empty cdrom in config file
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 13 May 2008 09:19:54 +0000 (10:19 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 13 May 2008 09:19:54 +0000 (10:19 +0100)
This is because function "uname = config.get('uname', '')" returns '',
rather than None, if uname is not in config variable.

Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
tools/python/xen/xend/server/blkif.py

index 6305a64ac74a660ccba16dbd99f06a093c9bc0c2..82853d6fbf46104733649ee6951bca1376301136 100644 (file)
@@ -47,7 +47,7 @@ class BlkifController(DevController):
         except ValueError:
             dev_type = "disk"
 
-        if uname is None:
+        if uname == '':
             if dev_type == 'cdrom':
                 (typ, params) = ("", "")
             else: